// 统一样式入口文件
@use './naive-ui-variables.scss';
@use './desktop.scss';
@use './idea.scss';

// 全局样式重置和基础设置
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0; /* 全局取消圆角 */
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  font-size: var(--desktop-font-size);
  line-height: 1.5715;
  color: var(--n-text-color);
  background-color: var(--n-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  height: 100%;
  width: 100%;
  overflow: hidden;
  border-radius: 0; /* 取消圆角 */
}

// 滚动条样式
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--n-color-2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--n-color-3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--n-color-4);
}

// 全局桌面软件风格类
.desktop-page {
  padding: var(--desktop-padding-lg);
  background-color: var(--n-color);
  min-height: calc(100vh - 64px);
}

.desktop-section {
  margin-bottom: var(--desktop-padding-lg);
}

.desktop-card {
  @extend .desktop-card;
  padding: var(--desktop-padding-lg);
  margin-bottom: var(--desktop-padding-md);
}

.desktop-panel {
  @extend .desktop-panel;
}

.desktop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--desktop-padding-md);
  padding-bottom: var(--desktop-padding-sm);
  border-bottom: 1px solid var(--desktop-border-color);
}

.desktop-title {
  font-size: var(--desktop-font-size-xl);
  font-weight: 600;
  color: var(--n-text-color-1);
}

.desktop-subtitle {
  font-size: var(--desktop-font-size-lg);
  font-weight: 500;
  color: var(--n-text-color-2);
  margin-top: var(--desktop-padding-xs);
}

.desktop-description {
  font-size: var(--desktop-font-size);
  color: var(--n-text-color-2);
  margin-top: var(--desktop-padding-xs);
}

.desktop-actions {
  display: flex;
  gap: var(--desktop-padding-sm);
}

.desktop-form {
  @extend .desktop-form;
  padding: var(--desktop-padding-lg);
}

.desktop-form-item {
  @extend .desktop-form-item;
}

.desktop-table-container {
  @extend .desktop-card;
  padding: 0;
  overflow: hidden;
}

.desktop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--desktop-padding-md) var(--desktop-padding-lg);
  border-bottom: 1px solid var(--desktop-border-color);
}

.desktop-table-content {
  padding: 0;
}

.desktop-pagination-container {
  display: flex;
  justify-content: flex-end;
  padding: var(--desktop-padding-md) var(--desktop-padding-lg);
  border-top: 1px solid var(--desktop-border-color);
}

.desktop-modal-content {
  padding: var(--desktop-padding-lg);
}

.desktop-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--desktop-padding-sm);
  padding-top: var(--desktop-padding-lg);
  border-top: 1px solid var(--desktop-border-color);
}

.desktop-drawer-content {
  padding: var(--desktop-padding-lg);
}

.desktop-drawer-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--desktop-padding-sm);
  padding-top: var(--desktop-padding-lg);
  border-top: 1px solid var(--desktop-border-color);
}

.desktop-sidebar-section {
  margin-bottom: var(--desktop-padding-lg);
}

.desktop-sidebar-title {
  font-size: var(--desktop-font-size);
  font-weight: 600;
  color: var(--n-text-color-2);
  margin-bottom: var(--desktop-padding-sm);
  padding: 0 var(--desktop-padding-sm);
}

.desktop-status-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: calc(var(--desktop-border-radius) / 2);
  font-size: var(--desktop-font-size-sm);
  font-weight: 500;
}

.desktop-status-success {
  background-color: rgba(82, 196, 26, 0.1);
  color: var(--desktop-success-color);
}

.desktop-status-warning {
  background-color: rgba(250, 173, 20, 0.1);
  color: var(--desktop-warning-color);
}

.desktop-status-error {
  background-color: rgba(245, 34, 45, 0.1);
  color: var(--desktop-error-color);
}

.desktop-status-info {
  background-color: rgba(24, 144, 255, 0.1);
  color: var(--desktop-info-color);
}

.desktop-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--desktop-padding-xl);
  color: var(--n-text-color-3);
}

.desktop-empty-icon {
  font-size: 48px;
  margin-bottom: var(--desktop-padding-md);
  color: var(--n-text-color-3);
}

.desktop-empty-text {
  font-size: var(--desktop-font-size-lg);
  margin-bottom: var(--desktop-padding-sm);
}

.desktop-empty-description {
  font-size: var(--desktop-font-size);
  color: var(--n-text-color-3);
  margin-bottom: var(--desktop-padding-md);
}

.desktop-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  /* 移除 z-index: 1000; */
}

.dark .desktop-loading-overlay {
  background-color: rgba(0, 0, 0, 0.6);
}

.desktop-highlight {
  background-color: rgba(24, 144, 255, 0.1);
  border: 1px solid rgba(24, 144, 255, 0.3);
  border-radius: var(--desktop-border-radius);
}

.desktop-code-block {
  background-color: var(--n-color-2);
  border: 1px solid var(--desktop-border-color);
  border-radius: var(--desktop-border-radius);
  padding: var(--desktop-padding-md);
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
  font-size: var(--desktop-font-size-sm);
  line-height: 1.5;
  overflow-x: auto;
}

.desktop-quote {
  border-left: 4px solid var(--desktop-primary-color);
  padding-left: var(--desktop-padding-md);
  margin: var(--desktop-padding-md) 0;
  color: var(--n-text-color-2);
}

.desktop-divider {
  @extend .desktop-divider;
  margin: var(--desktop-padding-lg) 0;
}

.desktop-flex {
  display: flex;
}

.desktop-flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.desktop-flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.desktop-flex-column {
  display: flex;
  flex-direction: column;
}

.desktop-text-center {
  text-align: center;
}

.desktop-text-left {
  text-align: left;
}

.desktop-text-right {
  text-align: right;
}

.desktop-full-width {
  width: 100%;
}

.desktop-full-height {
  height: 100%;
}

.desktop-margin-top-sm {
  margin-top: var(--desktop-padding-sm);
}

.desktop-margin-top-md {
  margin-top: var(--desktop-padding-md);
}

.desktop-margin-top-lg {
  margin-top: var(--desktop-padding-lg);
}

.desktop-margin-bottom-sm {
  margin-bottom: var(--desktop-padding-sm);
}

.desktop-margin-bottom-md {
  margin-bottom: var(--desktop-padding-md);
}

.desktop-margin-bottom-lg {
  margin-bottom: var(--desktop-padding-lg);
}

.desktop-margin-left-sm {
  margin-left: var(--desktop-padding-sm);
}

.desktop-margin-left-md {
  margin-left: var(--desktop-padding-md);
}

.desktop-margin-left-lg {
  margin-left: var(--desktop-padding-lg);
}

.desktop-margin-right-sm {
  margin-right: var(--desktop-padding-sm);
}

.desktop-margin-right-md {
  margin-right: var(--desktop-padding-md);
}

.desktop-margin-right-lg {
  margin-right: var(--desktop-padding-lg);
}

.desktop-padding-top-sm {
  padding-top: var(--desktop-padding-sm);
}

.desktop-padding-top-md {
  padding-top: var(--desktop-padding-md);
}

.desktop-padding-top-lg {
  padding-top: var(--desktop-padding-lg);
}

.desktop-padding-bottom-sm {
  padding-bottom: var(--desktop-padding-sm);
}

.desktop-padding-bottom-md {
  padding-bottom: var(--desktop-padding-md);
}

.desktop-padding-bottom-lg {
  padding-bottom: var(--desktop-padding-lg);
}

.desktop-padding-left-sm {
  padding-left: var(--desktop-padding-sm);
}

.desktop-padding-left-md {
  padding-left: var(--desktop-padding-md);
}

.desktop-padding-left-lg {
  padding-left: var(--desktop-padding-lg);
}

.desktop-padding-right-sm {
  padding-right: var(--desktop-padding-sm);
}

.desktop-padding-right-md {
  padding-right: var(--desktop-padding-md);
}

.desktop-padding-right-lg {
  padding-right: var(--desktop-padding-lg);
}